package com.idak.spring.web.flow.controller;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import com.idak.spring.web.flow.Person;
import com.idak.spring.web.flow.SearchCriteria;
import com.idak.spring.web.flow.SearchCriteriaService;


@Controller
public class SearchCriteriaController {

	@Autowired private SearchCriteriaService searchCriteriaService;
	
	public SearchCriteria initSearchCriteriaForm(){
		return new SearchCriteria();
	}
	
	public List<Person> searchCriteriaResul(SearchCriteria searchCriteria){
		return searchCriteriaService.serach(searchCriteria);
	}
	
	public Person getPersonDetails(Long personId){
		return searchCriteriaService.getPerson(personId);
	}
}
